package com.huazai.study;

public class JavaReflection {
    public static void main(String[] args) {
        User user = new User();
        System.out.println(User.m);
    }
}

class User {

    static {
//        System.out.println("the static code square is running !");
        m = 300;
    }

    public int a;
    private String name;
    static int m = 100;

    public User() {
//        System.out.println("the constructor had complete");
    }

    public User(int a, String name) {
        this.a = a;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void test1() {
        System.out.println("this is test 1");
    }

    public void test2(String print) {
        System.out.println(print + "  this is test 2");
    }

    @Override
    public String toString() {
        return this.name + "  is  " + this.a;
    }
}